package com.monter.carlo.poker.net.server;

import java.io.IOException;
import java.net.ServerSocket;

import com.monter.carlo.poker.domain.ServiceResult;
import com.monter.carlo.poker.domain.exception.TexasNetException;
import com.monter.carlo.poker.net.client.ITexasSocketClient;
import com.monter.carlo.poker.net.domain.TexasMessageVO;

public class DefaultTexasSocketServer implements ITexasSocketClient {
	private ServerSocket server;

	public DefaultTexasSocketServer() {
		init();
	}

	private void init() {
		try {
			server = new ServerSocket(7777);
		} catch (Exception e) {
			throw new TexasNetException("InitSocketClientException", e);
		}
	}

	public void close() {
		try {
			server.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public ServiceResult readMessage() {
		
		
		
		return ServiceResult.SUCCESS;
	}

	@Override
	public ServiceResult sendMessage(TexasMessageVO message) {
		return null;
	}
}
